﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

#pragma once
#include "GnufExtension.h"
#include "IModelView.h"
#include "Vector3d.h"
#include <QWidget>

namespace gcmp
{
    class IUiDocument;
}

namespace gnuf
{
    struct GnufPreviewData;
    extern GNUF_EXTENSION_EXPORT const GnufPreviewData PlaneViewPreview;
    extern GNUF_EXTENSION_EXPORT const GnufPreviewData EastElevationViewPreview;  //东立面
    extern GNUF_EXTENSION_EXPORT const GnufPreviewData View3DViewPreview;

    struct GnufPreviewData
    {
        gcmp::BuiltInViewType PreviewType;
        std::wstring ViewTypeName;
        gcmp::Vector3d ViewDirection;
        gcmp::Vector3d Origin;
        gcmp::Vector3d RightDirection;
        gcmp::Vector3d UpDirection;
        double TopPlane = 0.0;
        double BottomPlane = 0.0;
        double DeepPlane = 0.0;
        double CutPlane = 0.0;
    };

    struct GnufPreviewWgtInfo
    {
        std::wstring Title = GBMP_TR(L"预览视图");
        int MinWidth = 400;
        int MinHeight = 400;
        bool IsIsolated = true;
    };

    struct GnufPreviewSpaceInput
    {
        GnufPreviewWgtInfo PreviewWgtInfo;
        gcmp::IUiDocument* UiDocument = nullptr;
        GnufPreviewData PreviewInfo = PlaneViewPreview;
        std::wstring DefaultCommandName;
        bool DoActivePreview = false;         //是否需要激活预览视图，如果需要启用默认command必须激活视图，但激活视图会释放临时变量，action不能跨视图
        bool EnableRenderPatchCombine = true;
    };
}



